#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int main()
{
	int n,m;
	scanf("%d", &n);
	m = n;
	while (n > 1)
	{
		m *= (n-1);
		n--;
	}
	printf("%d\n", m);
	return 0;
}
